<%@page import="cl.tinet.trainee.tarea6.Usuario"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
	<%@page import="java.util.List"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>
<link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700'
	rel='stylesheet' type='text/css'>
<link rel="stylesheet" type="text/css" href="lib/bootstrap.css">
<link rel="stylesheet" href="lib/font-awesome.css">
<script src="lib/jquery-1.11.2.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="lib/theme.css">
<link rel="stylesheet" type="text/css" href="lib/premium.css">


<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
	<%
	Usuario usuario= (Usuario) request.getAttribute("usuario");
	%>
	<button conclick="window.location = '/mantenedor-tarea6-web/index.jsp'">Volver
		Menu Principal</button>
	<form id="usuario" action="/mantenedor-tarea6-web/ControladorUsuarios"
		method="post">
		<input type="hidden" name="accion" value="modificar" />
		<table align="center" cellpadding="12">

			<%
				out.println("<input type='hidden' name='nombreUsuario' value='"
						+ usuario.getUsername() + "'  />");
			%>

			<tr>
				<td>Nombre completo</td>
				<td>
					<%
						out.println("<input type='text' name='nombreCompleto' value='"
								+ usuario.getNombres() + "'  />");
					%>
				
			</tr>

			<tr>
				<td>Apellido Paterno</td>
				<td>
					<%
						out.println("<input type='text' name='apellidoPaterno' value='"
								+ usuario.getApellidoPaterno() + "'  />");
					%>

				</td>
			</tr>

			<tr>
				<td>Apellido Materno</td>
				<td>
					<%
						out.println("<input type='text' name='apellidoMaterno' value='"
								+ usuario.getApellidoMaterno() + "'  />");
					%>
				</td>
			</tr>
			<tr>
				<td>Password</td>
				<td>
					<%
						out.println("<input type='text' name='password' value='"
								+ usuario.getPassword() + "'  />");
					%>
				</td>
			</tr>
			<tr>
				<td>Activo</td>

				<td><select name="activo">
						<option value="-1"></option>
						<option value="true"
							<%if (usuario.isActivo()) {
				out.println("selected");
			}%>>Si</option>
						<option value="false"
							<%if (!usuario.isActivo()) {
				out.println("selected");
			}%>>No</option>
				</select></td>
			</tr>
			<tr>
				<td colspan="2" align="center"><input type="submit"
					value="Agregar" name="Agregar" /></td>
			</tr>
		</table>
	</form>
</body>
</html>